package com.ncsc.lmis.model;
// Generated Feb 25, 2014 11:44:39 PM by Hibernate Tools 3.4.0.CR1


import java.util.HashSet;
import java.util.Set;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * FinTransTmd02FromOrg generated by hbm2java
 */
@Entity
@Table(name="fin_trans_tmd02_from_org"
    ,catalog="lmis"
)
public class FinTransTmd02FromOrg  implements java.io.Serializable {


     private FinTransTmd02FromOrgId id;
     private FinTrans finTrans;
     private Set<FinTransTmd02FromOrgDetail> finTransTmd02FromOrgDetails = new HashSet<FinTransTmd02FromOrgDetail>(0);

    public FinTransTmd02FromOrg() {
    }

	
    public FinTransTmd02FromOrg(FinTransTmd02FromOrgId id, FinTrans finTrans) {
        this.id = id;
        this.finTrans = finTrans;
    }
    public FinTransTmd02FromOrg(FinTransTmd02FromOrgId id, FinTrans finTrans, Set<FinTransTmd02FromOrgDetail> finTransTmd02FromOrgDetails) {
       this.id = id;
       this.finTrans = finTrans;
       this.finTransTmd02FromOrgDetails = finTransTmd02FromOrgDetails;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="recNo", column=@Column(name="REC_NO", nullable=false) ), 
        @AttributeOverride(name="fromOrgNo", column=@Column(name="FROM_ORG_NO", nullable=false) ) } )
    public FinTransTmd02FromOrgId getId() {
        return this.id;
    }
    
    public void setId(FinTransTmd02FromOrgId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="REC_NO", nullable=false, insertable=false, updatable=false)
    public FinTrans getFinTrans() {
        return this.finTrans;
    }
    
    public void setFinTrans(FinTrans finTrans) {
        this.finTrans = finTrans;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="finTransTmd02FromOrg")
    public Set<FinTransTmd02FromOrgDetail> getFinTransTmd02FromOrgDetails() {
        return this.finTransTmd02FromOrgDetails;
    }
    
    public void setFinTransTmd02FromOrgDetails(Set<FinTransTmd02FromOrgDetail> finTransTmd02FromOrgDetails) {
        this.finTransTmd02FromOrgDetails = finTransTmd02FromOrgDetails;
    }




}


